export function getToken() {
    var token = localStorage.getItem('_token') || ''
    return token
}

export function setToken(token) {
    localStorage.setItem('_token', token)
    return token
}

export function getJsonFromUrl() {
    var query = window.location.search.substr(1);
    var result = {};
    query.split("&").forEach(function (part) {
        var item = part.split("=");
        result[item[0]] = decodeURIComponent(item[1]);
    });
    return result;
}